From b9145754d2bc5af0f7448a8c6d5e709ab8b28b91 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Thu, 3 Jul 2025 17:11:27 +0200 Subject: [PATCH] luci-base: give TextValue form elements separate readonly and disabled textarea widgets have more value as readonly and not disabled, than just disabled: you can scroll through them when they're readonly and not disabled. So give the form element separate readonly and disabled properties, so textarea elements defined as readonly with a large amount of content still cannot be modified, but at least the whole content can be viewed (because the textarea scrollbars still function). Signed-off-by: Paul Donald --- modules/luci-base/htdocs/luci-static/resources/form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index b6416a044c..7d3d2acd74 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -4601,7 +4601,8 @@ const CBITextValue = CBIValue.extend(/** @lends LuCI.form.TextValue.prototype */ rows: this.rows, wrap: this.wrap, validate: L.bind(this.validate, this, section_id), - disabled: (this.readonly != null) ? this.readonly : this.map.readonly + readonly: (this.readonly != null) ? this.readonly : this.map.readonly, + disabled: (this.disabled != null) ? this.disabled : null, }); return widget.render(); -- 2.30.2